﻿package {//soundFx

	import flash.media.Sound; //loads Flash's sound library
	import flash.media.SoundChannel; //loads the SoundChannel for manipulation of the sounds

	
	public class soundFx {
		
		//declarations
		public var sndPlay;
		public var sndPlayChannel:SoundChannel;
		
		
		
		public function playSound(newsound):void {//plays sound
			sndPlay=new newsound();
			sndPlayChannel=sndPlay.play();
		}
		
		public function stopSound():void {//stops sound to avoid possible overrun
			sndPlayChannel=sndPlay.stop();
			
			}
	}
	
}